f61a8c80bef960e1cb070d00dcc3260ebc813d45,app/src/main/java/com/greenaddress/greenbits/ui/TransactionActivity.java,TransactionActivity,replaceByFee,#TransactionItem#Coin#number#number#,344

Before Change


        Coin remainingFeeDelta = feeDelta;
        final List<TransactionOutput> origOuts = new ArrayList<>(tx.getOutputs());
        tx.clearOutputs();
        for (int i = 0; i < txItem.eps.size(); ++i) {
            final Map<String, Object> ep = (Map) txItem.eps.get(i);
            if (!((Boolean) ep.get("is_credit"))) continue;

            if (!((Boolean) ep.get("is_relevant")))
                // keep non-change/non-redeposit intact
                tx.addOutput(origOuts.get((Integer)ep.get("pt_idx")));
            else {
                if ((ep.get("subaccount") == null && subAccount == 0) ||
                        ep.get("subaccount").equals(subAccount))
                    change_pointer = (Integer) ep.get("pubkey_pointer");
                // change/redeposit
                final long value = Long.valueOf((String) ep.get("value"));
                if (Coin.valueOf(value).compareTo(remainingFeeDelta) <= 0) {
                    // smaller than remaining fee -- get rid of this output
                    remainingFeeDelta = remainingFeeDelta.subtract(

After Change


        final List<TransactionOutput> origOuts = new ArrayList<>(tx.getOutputs());
        tx.clearOutputs();

        for (final JSONMap ep : txItem.eps) {
            if (!ep.getBool("is_credit"))
                continue;

            if (!ep.getBool("is_relevant"))
                // keep non-change/non-redeposit intact
                tx.addOutput(origOuts.get(ep.getInt("pt_idx")));
            else {
                final Integer epSubaccount = ep.get("subaccount");
                if ((epSubaccount == null && subAccount == 0) ||
                    epSubaccount.equals(subAccount))
                    change_pointer = ep.getInt("pubkey_pointer");
                // change/redeposit
                final Coin value = ep.getCoin("value");
                if (value.compareTo(remainingFeeDelta) <= 0) {